#ifndef KNOWLEDGES_H
#define KNOWLEDGES_H
#include <QString>
#include "Fact.h"

namespace IAlib
{

class Knowledges
{
public:

    enum KnowledgeType
    {
        EnvironmentalKnowledge,
        SocialKnowledge,
        MeansKnowledge,
        GeneralKnowledge,
        UnknownKnowledge
    };

    Knowledges();

    KnowledgeType getType() const { return m_type; }
    void setType(const KnowledgeType type) { m_type = type; }

    void setLastCheck(const quint64 step) {m_last_check = step; }
    quint64 getLastCheck() const { return m_last_check; }

    QList<Fact*> getAssociatedFacts() const;
    void addAssociatedFact(const Fact& fact);
    void addAssociatedFacts(const QList<Fact>& list_fact);
    bool removeAssociatedFact(const QString& fact_name);

    Fact* getAssociatedFact(const QString& fact_name);

    virtual QByteArray toByteArray() const = 0 ;
    virtual void fromByteArray(QByteArray& byte_array) = 0;

protected:
    QList<Fact*>   m_associated_facts;

private:

    KnowledgeType m_type;
    quint64       m_last_check;


};

}

#endif // KNOWLEDGES_H
